<?php
/**
 * 作用：cli方式调用API入口，与api.php的调用方式不同
 * 作者: shijy@soe-soe.com
 * 日期: 2016/5/5 17:38
 * 公司: 浙江宣逸网络科技有限公司<www.soe-soe.com>
 */


session_start();
ini_set("display_errors",'on');
error_reporting(E_ALL);
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用入口文件

// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');

// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',True);
define('APP_MODE','cli');
define('WEBSITE_PATH',dirname($_SERVER['PHP_SELF']));
// 定义应用目录
define('APP_PATH',WEBSITE_PATH.'/Application/');
define('WEB_ROOT',__DIR__);



//加载通用常量配置
include_once APP_PATH.'Common/Conf/baseEnum.php';
//加载个性化常量配置
$localConfig=WEB_ROOT.'/data/local_specialConfig.php';
if(file_exists($localConfig)){
    include_once $localConfig;
}else{
    include_once APP_PATH.'Common/Conf/defaultConfig.php';
}



// 引入ThinkPHP入口文件
require WEBSITE_PATH.'/ThinkPHP/ThinkPHP.php';
// 亲^_^ 后面不需要任何代码了 就是如此简单

